#include<stdio.h>
// 1,1,  2,3,  5,8,  13,21,  34
int main(){
	int n,mon=2;
	int a=1,b=1;
	scanf("%d",&n);
	if(n == 1){
		printf("1");
	}else{
		int t;
		while(b < n){
			mon++;
			t = b + a;
			a = b;
			b = t;
		}
		printf("%d",mon);
	}

	return 0;
	
}
